import axios from axios
export default {
    //用于能够被4个mapXxxxxx识别的命名空间
    namespaced,
    actions:{
        getPersonFromServer(context){
            axios.get('https://api.uixsj.cn/hitokoto/get?type=social').then(
                response => {
                    context.commit("addPerson",response.data)
                },
                error => {},
            )
        }
    },
    mutations:{
        addPerson(state,value){
            state.personList.unshift(value)
        }
    },
    state:{
        personList:[
            {id:'001',name:'zhangsan'},
        ]
    },
    getters : {
        firstPersonName(){
            return 
        }
    }
}
